<?php
/**
 * PHP versions 4 and 5
 * MagicPHP
 * Licensed under The Open Group Test Suite License
 * Redistributions of files must retain the above copyright notice.
 * @copyright     Copyright 2011
 * @link
 * @package       Magic Lib
 * @since         MaginPHP 1.0
 * @license
 */
?>
<?php

/*
 * @desc: This is the acl class 
 * Use to create acl array object for framework
 */

class MAGIC_ACL {

    /**
     * @desc: This is instance variable of the class 
     * @var type : private static 
     */
    private static $_instance;

    /**
     * @desc : This is only static method of the class /
     * Remaining method of the class call vai this method . 
     * @return type 
     */
    public static function callMethod() {
        self::$_instance = new self;
        return self::$_instance;
    }

    /**
     * @desc : This function is used to conver the array into object 
     * This function is used to generate acl object array for framewrok
     * @param type $array : array 
     * @return stdClass : object array of array 
     */
    public function bindArrayToObject($array) {
        $return = new stdClass();
        foreach ($array as $k => $v) {
            if (is_array($v)) {
                $return->$k = $this->bindArrayToObject($v);
            } else {
                $return->$k = $v;
            }
        }
        return $return;
    }
    /**
     * 
     */
    public function isAllow($appcal){
      global $aclObj ;
      $mvc = explode("|",$appcal);
      
    }
}
?>
